package cn.sofwin.day0120.homework.bank.com;

import java.util.Scanner;

public class AccountTest {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Account a = new Account();
        double money;
        int choose;
        do {
            System.out.println("1.存款  2.取款  0.退出");
            System.out.println("请选择您需要办理的业务");
            choose = sc.nextInt();
            switch (choose) {
                case 0:
                    System.out.println("谢谢使用！");
                    break;
                case 1:
                    System.out.println("请输入存款金额");
                    money = sc.nextInt();
                    a.deposit(money);
                    break;
                case 2:
                    System.out.println("请输入取款金额");
                    money = sc.nextInt();
                    a.withdrawal(money);
                    break;
                default:
                    System.out.println("输入错误！");
            }
        } while (choose != 0);
    }
}
